1. Field of the Invention
The present invention relates to an echo canceler and echo canceling method useful, for example, for canceling line echo arising from a hybrid circuit in a telephone circuit.
2. Description of the Related Art
Referring to FIG. 1, a conventional echo canceler 10 of this type comprises an adaptive filter 11, a subtractor 12 (depicted as an adder with a negative subtrahend input terminal), a double-talk detector 13, a squared norm calculator 14, and a step size calculator 15.
The echo canceler 10 receives a far-end input signal Rin from the party at the far end of the telephone connection. This far-end input signal Rin is furnished to the party at the near end of the connection as a far-end output signal Rout, and is furnished to the adaptive filter 11 as a digital far-end signal x(n).
The adaptive filter 11 uses a set of filter coefficients to filter the far-end signal x(n) (which is identical to Rin), thereby generates an echo replica signal y(n), and updates the filter coefficients according to a residual error signal e(n).
The subtractor 12 subtracts the echo replica signal y(n) from a near-end input signal Sin received from the party at the near end to generate the residual error signal RES (also denoted e(n)), which is input to the adaptive filter 11 and, at the same time, is transmitted toward the party at the far end. The subtractor 12 thereby removes an echo from the outgoing signal sent to the far end.
The double-talk detector 13 monitors the far-end input signal Rin, near-end input signal Sin, and residual error signal RES to supervise the state of speech on the line. The double-talk detector 13 disables the updating of the coefficients in the adaptive filter 11 when the party at the near end speaks, when both parties speak, and when neither party is speaking, and enables updating of the coefficients when only the party at the far end speaks.
The squared norm calculator 14 receives the far-end input signal Rin (x(n)), calculates its squared norm (∥x(n)∥2), and outputs the calculated result to the step size calculator 15. The squared norm (∥x(n)∥2) is calculated as follows:
                                                                    x              ⁡                              (                n                )                                                          2                =                                            x              2                        ⁡                          (              n              )                                +                                    x              2                        ⁡                          (                              n                -                1                            )                                +          …          +                                    x              2                        ⁡                          (                              n                -                M                +                1                            )                                                              =                                                                          x                ⁡                                  (                                      n                    -                    1                                    )                                                                    2                    +                                    x              2                        ⁡                          (              n              )                                -                                    x              2                        ⁡                          (                              n                -                M                            )                                          The letter M indicates the tap length of the adaptive filter 11.
The step size calculator 15 receives the squared norm (∥x(n)∥2) of the far-end input signal Rin (x(n)) and the residual error signal RES (e(n)), calculates a step size for updating the filter coefficients, and provides the step size to the adaptive filter 11.
The hybrid circuit 20 in FIG. 1 has a two-wire/four-wire conversion function with which it interfaces the two-wire circuit leading to the near-end telephone (not shown) with the four-wire circuit formed by the separate transmitting and receiving paths in the echo canceler 10.
When the party at the far end speaks, the input signal Rin that the echo canceler 10 receives from the far end is passed to the hybrid circuit 20 as the far-end output signal Rout (Rout is identical to the far-end input signal Rin) and, at the same time, is provided internally to the adaptive filter 11.
The hybrid circuit 20 transmits the far-end output signal Rout onward to the party at the near end, or more precisely, to the near-end party's telephone (not shown). Some of the signal energy, however, leaks into the near-end input signal Sin and returns to the echo canceler 10 as line echo. If only the far-end party is speaking, substantially all of the near-end input signal Sin may be line echo.
In the echo canceler 10, the adaptive filter 11 uses the filter coefficients to filter the far-end input signal x(n), thereby generates the echo replica signal y(n), and outputs it to the subtractor 12. The subtractor 12 subtracts the echo replica signal y(n) from the near-end input signal Sin to remove the echo.
One known algorithm for updating the coefficients of the adaptive filter is the normalized least mean squares (LMS) algorithm.
The normalized LMS coefficient updating formula can be written, for example, as follows (k=0, 1, 2, . . . , M−1):
            h      k        ⁡          (              n        +        1            )        =                    h        k            ⁡              (        n        )              +                            α          ⁢                                          ⁢                      e            ⁡                          (              n              )                                                β          +                                                                  x                ⁡                                  (                  n                  )                                                                    2                              ⁢              x        ⁡                  (                      n            -            k                    )                    
In the above equation, α is a step size parameter, the terms hk(n) and hk(n+1) are the filter coefficients before updating and after updating, respectively, and M is the filter tap length. The quantity β is a constant that is normally greater than zero, but may be set to zero.
The term ∥x(n)∥2 represents the squared norm of the far-end input signal Rin (x(n)) and can be calculated as shown above.
If a step size μ variable is defined as
      μ    =          α              β        +                                                        x              ⁡                              (                n                )                                                          2                      ,the variable μ can be used to rewrite the normalized LMS coefficient updating formula in the following form:hk(n+1)=hk(n)+μ·e(n)·x(n−k)
The adaptive filter 11 calculates the value of the echo replica signal y(n) as follows:
      y    ⁡          (      n      )        =            ∑              k        =        0                    M        -        1              ⁢                  x        ⁡                  (                      n            -            k                    )                    ·                        h          k                ⁡                  (          n          )                    
From these equations, the step size calculator 15 calculates the step size μ and the adaptive filter 11 updates the filter coefficients hk(n) and generates the echo replica signal y(n).
The normalized LMS algorithm converges if 0<α<2. Convergence is fastest with unity step size (α=1.0), but with smaller step size values, the updating of the filter coefficients becomes more conservative and the stability of the adaptive filter is improved. Improved stability means that the filter coefficients are less apt to diverge because of disturbances such as near-end background noise, or because of narrow-band signal inputs such as tone signals.
Details of the normalized LMS algorithm can be found in Adaptive Filter Theory by Simon Haykin (Prentice Hall, fourth edition 2001).
An ideal echo canceler should have high convergence speed, little residual error after adaptation has converged, and high stability.
A problem with the conventional echo canceler described above is that the echo cancellation performance is significantly degraded in environments with much near-end background noise.
FIGS. 2A to 2E show simulated signal waveforms in the conventional echo canceler in an environment with little background noise: FIG. 2A represents the received far-end input signal Rin; FIG. 2B shows the corresponding echo that leaks through the hybrid circuit 20; FIG. 2C represents near-end background noise Sgen; FIG. 2D shows the near-end input signal Sin; FIG. 2F represents the residual signal RES after echo cancellation. Time (t) in seconds (sec) is indicated on the horizontal axis in these figures. The vertical scale in FIG. 2A is compressed in relation to the vertical scales in FIGS. 2B to 2E. FIGS. 3A to 3E show the corresponding simulated signal level waveforms, signal level being expressed in dBm.
In these simulations, the characteristics of the echo path were modeled by use of echo path model 1 in Annex D of Recommendation G.168-2004 of the Telecommunication Standardization Sector of the International Telecommunications Union (ITU-T). The hybrid echo return loss was assumed to be 10 dB, so the signal level of the echo signal Echo in FIG. 3B is 10 dB lower than the signal level of the far-end input signal Rin in FIG. 3A.
Near-end background noise is indicated by the symbol Sgen. A background noise level of −65 dBm is assumed as an example of an environment with little background noise.
The near-end input signal Sin is the sum of the echo signal Echo and the near-end background noise Sgen.
The signal levels in FIGS. 3A to 3E were calculated according to the level measurement method described in the G.168-2004 Section 6.4.1.2.1.
In the simulations in FIGS. 2A to 2E and FIGS. 3A to 3E, the step size parameter α, constant β, and filter tap length M were set to the following values: α=0.5, β=0, M=128.
Although the double-talk detector 13 monitors the far-end input signal Rin, near-end input signal Sin, and residual error signal RES to supervise the speech state, since the near-end party was assumed not to be speaking in this simulation, the operation of the double-talk detector 13 was simplified as follows. If the condition∥x(n)∥2≦−40 dbmis true, the far-end input signal Rin(x(n)) is treated as silent and the double-talk detector 13 disables updating of the coefficients in the adaptive filter 11; otherwise, the double-talk detector 13 enables updating of the coefficients in the adaptive filter 11. The threshold value (−40 dBm) is exemplary; other values could be used instead.
As shown by the signal levels in FIGS. 3B and 3E, although the echo signal level of the near-end input signal Sin reaches peak values of about −15 dBm, the level of the residual error signal RES after convergence is close to the background noise level of −65 dBm, indicating that the echo has been successfully canceled.
FIGS. 4A to 4E and FIGS. 5A to 5E show simulation results for the conventional echo canceler in an environment with much background noise. The signals represented and the scales on the horizontal and vertical axes are the same as in FIGS. 2A to 2E and FIGS. 3A to 3E.
As an example of an environment with much background noise, the level of the background noise Sgen generated at the near end was assumed to be −45 dBm. The other conditions were the same as in the preceding simulation of an environment with little background noise.
As shown by the signal levels in FIGS. 5B and 5E, the peak echo signal level of the near-end input signal Sin was again about −15 dBm, and the level of the residual error signal RES after convergence was about −35 dBm. Accordingly, although the echo was reduced, the residual signal level was still larger by about 10 dBm than the background noise level of −45 dBm, indicating significantly degraded echo canceling performance.
The reason why echo canceling performance is degraded in an environment with much background noise is thought to be as follows. The near-end input signal Sin input to the subtractor 12 includes background noise from the near end and line echo from the hybrid circuit 20. Subtraction of the echo replica signal y(n) from the near-end input signal in the subtractor 12 reduces the line echo, but does not reduce the near-end background noise, which remains present in the residual error signal RES. When the adaptive filter 11 updates its coefficients, this background noise interferes so that the filter coefficients do not converge as expected, making the echo replica signal an inaccurate replica of the true line echo.
The echo canceling performance in an environment with much background noise can be improved by reducing the step size parameter α and increasing the constant β, but this method has the drawback of reducing the speed of convergence in an environment with little background noise.